<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>贷款计算器</title>
		<link rel="shortcut icon" type="image/x-icon" href="//s10.realdtech.com/finchain/finchain-zhaoshang/img/favicon-logo.ico" />
		<link rel="stylesheet" type="text/css" href="//static1.finchain.cc/lib/amazeui/v2.7.2/css/amazeui.min.css"/>
		<link rel="stylesheet" type="text/css" href="//s10.realdtech.com/finchain/finchain-zhaoshang/css/base.css"/>
		<link rel="stylesheet" type="text/css" href="//s10.realdtech.com/finchain/finchain-zhaoshang/css/public.css"/>
		<link rel="stylesheet" type="text/css" href="//s10.realdtech.com/finchain/finchain-zhaoshang/css/calculator.css"/>
		<!--[if lte IE 8]>
            <script>window.location.href='http://cdn.dmeng.net/upgrade-your-browser.html?referrer='+location.href;</script>
        <![endif]-->
		<script src="//s10.realdtech.com/finchain/finchain-zhaoshang/js/public.js"></script>
	</head>
	<body>
	<div id="container">
		<!--头部-->
		 <div id="header">
				<div class="header-top">
					<div class="inner">
						<ul>
							<li><a href="index"><img src="//s10.realdtech.com/finchain/finchain-zhaoshang/img/home.png"/>金融链</a></li>
							<li><a href="join"><img src="//s10.realdtech.com/finchain/finchain-zhaoshang/img/zhaoshang.png"/>招商加盟</a></li>
							<li><a href="#">金融链-让天下没有难贷的款</a></li>
						</ul>
						<ul style="float: right;">
							<li class="weixin">
								<a href="#"><img src="//s10.realdtech.com/finchain/finchain-zhaoshang/img/weixin.png"/>微信公众号</a>
								<div class="weixinImg">
									<img src="//s10.realdtech.com/finchain/finchain-zhaoshang/img/erweima.png"/>
								</div>
							</li>
							<li><a href="#"><img src="//s10.realdtech.com/finchain/finchain-zhaoshang/img/tel.png"/>招商热线：<span class="hot">400-606-9989</span></a></li>
						</ul>
					</div>
				</div>
				<div class="header-bottom">
					<div class="logo">
						<img src="//s10.realdtech.com/finchain/finchain-zhaoshang/img/logo.png"	/>
					</div>
					<div class="address">
						城市/<span class="addLocation">郑州</span>
						<div class="switchCity">
							切换城市
							<div class="publicHeight">
								<div class="publicCitys">
									<div>进入城市</div>
									<div>
										<a href="#">北京</a>
										<a href="#">上海</a>
										<a href="#">重庆</a>
										<a href="#">天津</a>
										<a href="#">广州</a>
										<a href="#">青岛</a>
										<a href="#">深圳</a>
										<a href="#">合肥</a>
										<a href="#">南昌</a>
										<a href="#">贵阳</a>
										<a href="#">福州</a>
										<a href="#">西安</a>
										<a href="#">南京</a>
										<a href="#">郑州</a>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="login-register" style="float: right;">
						<a href="#">登录入口</a><a href="bussinessRegister">企业注册</a>
					</div>
					<div class="nav" style="float: right;">
						<ul>
							<li><a href="index" style="margin-left: 0;">金融链</a></li>
							<li><a href="productShow">渠道展示</a></li>
							<li><a href="businessShow">业务展示</a></li>
							<li><a href="infomationCenter">资讯中心</a></li>
							<li><a href="join">招商加盟</a></li>
						</ul>
					</div>
				</div>
			</div>
			<!--banner-->
			<div class="calculator-banner">
				
			</div>
			<!--内容部分-->
			<div class="calculator-content">
				<div class="calculator-head">
					<ul>
						<li><a class="active calculatorAs">车贷计算器</a></li>
						<li><a class="calculatorAs">房贷计算器</a></li>
						<li><a class="calculatorAs">信贷计算器</a></li>
					</ul>
				</div>
				<div class="calculator">
					<!--车贷计算器-->
					<div class="content active">
						<div class="calculator-mark">
							<img src="//s10.realdtech.com/finchain/finchain-zhaoshang/img/car-icon1.png" />
							<div class="mark-con">
								<h2>车贷计算器</h2>
								<p>车贷计算器用于计算办理汽车抵押贷款时，在选择等额本息和先息后本两种不同还款方式后，各自需要支出的月供，车贷利息总额和还款总额。</p>
							</div>
						</div>
						<div class="calculator-form">
							<p><span><img src="//s10.realdtech.com/finchain/finchain-zhaoshang/img/edit-icon1.png">填写贷款信息</span></p>
							<form action="" class="am-form">
							  <fieldset>
							    <div class="am-form-group">
							      <label for="doc-vld-name">贷款金额</label>
							      <input type="text" class="loanMoney" name="loanMoney" minlength="3" placeholder="输入贷款金额" class="am-form-field"/>
							      <i class="unit">元</i>
							    </div>
							     <div class="am-form-group">
							      <label for="doc-vld-name">贷款期限</label>
							      <select  data-am-selected class="loan-limit">
									    <option value="3">3个月</option>
									    <option value="6">6个月</option>
									    <option value="9">9个月</option>
									    <option value="12">12个月</option>
									</select>
							    </div>
							    <div class="am-form-group">
							      <label for="doc-vld-name">月利率</label>
							      <input type="text" class="monthly" name="monthly" minlength="3" placeholder="请输入月利率" class="am-form-field" required/>
							      <i class="unit">%</i>
							    </div>
							     <div class="am-form-group">
							      <label for="doc-vld-name">还款方式</label>
							      <select  data-am-selected class="back-way">
									    <option value="等额本息">等额本息</option>
									    <option value="先息后本">先息后本</option>
									</select>
							    </div>
							    <button type="button" class="calculate">开始计算</button>
							    <button type="button" class="reset">重新计算</button>
							  </fieldset>
							</form>
						</div>
						<div class="calculate-result">
							<h2>计算结果</h2>
							 <div class="input-group">
							      <label>每月还款本息</label>
							      <input type="text" class="loanCapitalInterests" readonly="readonly" value=""/>
							      <span>元</span>
							</div>
							 <div class="input-group" class="every-monthInterests">
							      <label>每月利息</label>
							      <input type="text" class="monthInterests" readonly="readonly" value=""/>
							      <span>元</span>
							</div>
							 <div class="input-group">
							      <label>还款总利息</label>
							      <input type="text" class="backInterests" readonly="readonly" value=""/>
							      <span>元</span>
							</div>
							 <div class="input-group">
							      <label>还款总额</label>
							      <input type="text" class="backCount" readonly="readonly" value=""/>
							      <span>元</span>
							</div>
							<p>*此结果仅供参考，实际费用应以当地为准</p>
						</div>
						<div class="clearfix"></div>
					</div>
					<!--房贷计算器-->
					<div class="content">
						<div class="calculator-mark">
							<img src="//s10.realdtech.com/finchain/finchain-zhaoshang/img/house-icon1.png" />
							<div class="mark-con">
								<h2>房贷计算器</h2>
								<p>房贷计算器用于计算办理房屋抵押贷款时，在还款方式为先息后本的情况下，各自需要支出的月供，房贷利息总额和还款总额。</p>
							</div>
						</div>
						<div class="calculator-formHouse">
							<p><span><img src="//s10.realdtech.com/finchain/finchain-zhaoshang/img/edit-icon1.png">填写贷款信息</span></p>
							<form action="" class="am-form">
							  <fieldset>
							    <div class="am-form-group">
							      <label for="doc-vld-name">贷款金额</label>
							      <input type="text" class="loanMoneyHouse" name="loanMoneyHouse" minlength="3" placeholder="输入贷款金额" class="am-form-field"/>
							      <i class="unit">元</i>
							    </div>
							     <div class="am-form-group">
							      <label for="doc-vld-name">贷款期限</label>
							      <select  data-am-selected class="loan-limitHouse">
									    <option value="6">6个月</option>
									    <option value="12">12个月</option>
									    <option value="18">18个月</option>
									    <option value="24">24个月</option>
									  	<option value="30">30个月</option>
									 	 <option value="36">36个月</option>
									</select>
							    </div>
							    <div class="am-form-group">
							      <label for="doc-vld-name">月利率</label>
							      <input type="text" class="monthlyHouse" name="monthlyHouse" minlength="3" placeholder="请输入月利率" class="am-form-field" required/>
							      <i class="unit">%</i>
							    </div>
							     <div class="am-form-group">
							      <label for="doc-vld-name">还款方式</label>
							      <select  data-am-selected class="back-wayHouse">
									    <option value="先息后本">先息后本</option>
									 	<option value="等额本息">等额本息</option>
									</select>
							    </div>
							    <button type="button" class="calculateHouse">开始计算</button>
							    <button type="button" class="reset">重新计算</button>
							  </fieldset>
							</form>
						</div>
						<div class="calculate-resultHouse">
							<h2>计算结果</h2>
							 <div class="input-group">
							      <label>每月还款本息</label>
							      <input type="text" class="loanCapitalInterestsHouse" readonly="readonly" value=""/>
							      <span>元</span>
							</div>
							 <div class="input-group">
							      <label>每月利息</label>
							      <input type="text" class="monthInterestsHouse" readonly="readonly" value=""/>
							      <span>元</span>
							</div>
							 <div class="input-group">
							      <label>还款总利息</label>
							      <input type="text" class="backInterestsHouse" readonly="readonly" value=""/>
							      <span>元</span>
							</div>
							 <div class="input-group">
							      <label>还款总额</label>
							      <input type="text" class="backCountHouse" readonly="readonly" value=""/>
							      <span>元</span>
							</div>
							<p>*此结果仅供参考，实际费用应以当地为准</p>
						</div>
						<div class="clearfix"></div>
					</div>
					<!--信贷计算器-->
					<div class="content">
						<div class="calculator-mark">
							<img src="//s10.realdtech.com/finchain/finchain-zhaoshang/img/credit-icon1.png" />
							<div class="mark-con">
								<h2>信用贷计算器</h2>
								<p>信贷计算器用于计算办理信用贷款时，在还款方式为等额的情况下，各自需要支出的月供，信贷利息总额和还款总额。</p>
							</div>
						</div>
						<div class="calculator-formCredit">
							<p><span><img src="//s10.realdtech.com/finchain/finchain-zhaoshang/img/edit-icon1.png">填写贷款信息</span></p>
							<form action="" class="am-form">
							  <fieldset>
							    <div class="am-form-group">
							      <label for="doc-vld-name">贷款金额</label>
							      <input type="text" class="loanMoneyCredit" name="loanMoneyCredit" minlength="3" placeholder="输入贷款金额" class="am-form-field"/>
							      <i class="unit">元</i>
							    </div>
							     <div class="am-form-group">
							      <label for="doc-vld-name">贷款期限</label>
							      <select  data-am-selected class="loan-limitCredit">
									    <option value="3">3个月</option>
									    <option value="6">6个月</option>
									    <option value="9">9个月</option>
									    <option value="12">12个月</option>
									</select>
							    </div>
							    <div class="am-form-group">
							      <label for="doc-vld-name">月利率</label>
							      <input type="text" class="monthlyCredit" name="monthlyCredit" minlength="3" placeholder="请输入月利率" class="am-form-field" required/>
							      <i class="unit">%</i>
							    </div>
							     <div class="am-form-group">
							      <label for="doc-vld-name">还款方式</label>
							      <select  data-am-selected class="back-wayCredit">
									    <option value="等额本息">等额本息</option>
									</select>
							    </div>
							    <button type="button" class="calculateCredit">开始计算</button>
							    <button type="button" class="reset">重新计算</button>
							  </fieldset>
							</form>
						</div>
						<div class="calculate-resultCredit">
							<h2>计算结果</h2>
							 <div class="input-group">
							      <label>每月还款本息</label>
							      <input type="text" class="loanCapitalInterestsCredit" readonly="readonly" value=""/>
							      <span>元</span>
							</div>
							 <div class="input-group">
							      <label>每月利息</label>
							      <input type="text" class="monthInterestsCredit" readonly="readonly" value=""/>
							      <span>元</span>
							</div>
							 <div class="input-group">
							      <label>还款总利息</label>
							      <input type="text" class="backInterestsCredit" readonly="readonly" value=""/>
							      <span>元</span>
							</div>
							 <div class="input-group">
							      <label>还款总额</label>
							      <input type="text" class="backCountCredit" readonly="readonly" value=""/>
							      <span>元</span>
							</div>
							<p>*此结果仅供参考，实际费用应以当地为准</p>
						</div>
						<div class="clearfix"></div>
					</div>
				</div>
			</div>
			
			<!--底部-->
			 <div id="footer">
				<div class="footer-con">
					<div class="footer-con-top">
						<div class="product">
							<h4>渠道展示</h4>
							<ul>
								<li><a href="productShow?ck=0">信用贷款</a></li>
								<li><a href="productShow?ck=1">车辆贷款</a></li>
								<li><a href="productShow?ck=2">房屋贷款</a></li>
								<li><a href="productShow?ck=3">企业贷款</a></li>
							</ul>
						</div>
						<div class="product">
							<h4>招商加盟</h4>
							<ul>
								<li><a href="join">品牌实力</a></li>
								<li><a href="join">雄厚资源</a></li>
								<li><a href="join">服务人群</a></li>
								<li><a href="join">盈利模式</a></li>
								<li><a href="join">合作流程</a></li>
							</ul>
						</div>
						<div class="product-bot">
							<ul>
								<li><a href="businessShow">业务展示</a></li>
								<li><a href="infomationCenter">资讯中心</a></li>
								<li><a href="contactUs">联系我们</a></li>
								<li><a href="calculator">贷款计算器</a></li>
							</ul>
							<a href="join_apply.html">渠道入驻</a>
						</div>
						<div class="product-bot">
							<img src="//s10.realdtech.com/finchain/finchain-zhaoshang/img/erweima.png" alt="" />
							<p>扫一扫关注微信公众号</p>
						</div>
						<div class="product-bot">
							<p class="special-p">招商热线：</p>
							<h4>400-606-9989</h4>
							<p>（仅工作日：09:00~18:00）</p>
							<p class="special-p" style="margin-top: 10px;">地址：</p>
							<p style="text-align: left;">河南省郑州市郑东新区康宁街与普济路交叉口威斯顿广场</p>
						</div>
					</div>
					<div class="footer-con-mid">
						<div><img src="//s10.realdtech.com/finchain/finchain-zhaoshang/img/sec-1.png" alt="" /></div>
						<div><img src="//s10.realdtech.com/finchain/finchain-zhaoshang/img/sec-2.png" alt="" /></div>
						<div><img src="//s10.realdtech.com/finchain/finchain-zhaoshang/img/sec-3.png" alt="" /></div>
						<div><img src="//s10.realdtech.com/finchain/finchain-zhaoshang/img/sec-4.png" alt="" /></div>
						<div><img src="//s10.realdtech.com/finchain/finchain-zhaoshang/img/sec-5.png" alt="" /></div>
					</div>
				</div>
				<div class="footer-con-bot">版权所有&copy;真金网络科技（北京）有限公司 京ICP备16027759 号-2</div>
			</div>
		</div>
	</div>
	</body>
	<script src="//static1.finchain.cc/lib/amazeui/v2.7.2/js/jquery.min.js"></script>
	<script src="//static1.finchain.cc/lib/amazeui/v2.7.2/js/amazeui.min.js"></script>
	<script>
		var url=window.location.search
		url=url.split("=")[1];
		if(url==0){
			$(".content").removeClass("active").eq(url).addClass("active")
			$(".calculatorAs").removeClass("active").eq(url).addClass("active")
		};
		if(url==1){
			$(".content").removeClass("active").eq(url).addClass("active")
			$(".calculatorAs").removeClass("active").eq(url).addClass("active")
		};
		if(url==2){
			$(".content").removeClass("active").eq(url).addClass("active")
			$(".calculatorAs").removeClass("active").eq(url).addClass("active")
		};
		
		//头部导航切换
		$(".publicCitys a").click(function(){
			$(".addLocation").text($(this).text())
		})
		/*菜单切换*/
		var calculatorLis=$(".calculator-head ul li");
		calculatorLis.on("click",function(){
			var $this = $(this).index();
			$(this).find("a").addClass("active");
			$(this).siblings().find("a").removeClass();
			$(".calculator .content").eq($this).show().siblings().hide();
		});
		
	
		
		//车贷计算器
			$(".calculate").on("click",function(){
				var $loanMoney =parseInt($(".loanMoney").val());
				var $loanLimit =parseInt($(".loan-limit").val());
				var $monthly = parseFloat($(".monthly").val())/100;
				var $backWay = $(".back-way").val();
				$(".calculator-form").animate({marginLeft:"0px"},"slow");
				$(".calculate-result").animate({marginRight:"0px"},"slow","linear" );
			//等额本息
			function count() { console.log($monthly)
				var mos = $loanLimit, //选择的还款期限(月)
					capital = $loanMoney, //本金
					monthPow = Math.pow((1+$monthly),mos),     // 一加利率的还款月数次方
					payments = (( capital*$monthly*monthPow )/( monthPow -1) ); //每月还款额
					 console.log(payments)
				var interests = (parseFloat(payments*mos)-capital);  //还款总利息
				var totalLoan = parseFloat(payments*mos); //还款总额
				$(".loanCapitalInterests").val(payments.toFixed(2));
				$(".backInterests").val(interests.toFixed(2));
				$(".backCount").val(totalLoan.toFixed(2));
	
				if($(".loanMoney").val() == '') {
					$(".loanCapitalInterests").val(0);
					$(".backInterests").val(0);
					$(".backCount").val(0);
				}
				if($(".monthly").val() == '' || $(".monthly").val() == 0) {
					$(".loanCapitalInterests").val(0);
					$(".backInterests").val(0);
					$(".backCount").val(0);
				}
				
			}
				//先息后本
				function count1(){
					var mos = $loanLimit, //选择的还款期限(月)
						capital = $loanMoney; //本金
					var $monthly = parseFloat($(".monthly").val())/100;
					console.log($monthly)
					var interests = capital*$monthly;  //每月利息
					var totalInterests = (capital*$monthly*mos);//还款总利息
					var totalLoan = capital*($monthly*mos+1); //还款总额
					$(".monthInterests").val(interests.toFixed(2));
					$(".backInterests").val(totalInterests.toFixed(2));
					$(".backCount").val(totalLoan.toFixed(2));
					if($(".loanMoney").val() == '') {
						$(".calculate-result input").val(0);
					}
					if($(".monthly").val() == '') {
						$(".calculate-result input").val(0);
					}
				}
				//判断等额本息还是先息后本
				$(".calculate-result").find("div").eq(0).css("display","none");
				if($backWay ==　"等额本息"){
					$(".calculate-result").find("div").eq(1).css("display","none");
					count();
				}else if($backWay ==　"先息后本"){
					$(".calculate-result").find("div").eq(0).css("display","none");
					$(".calculate-result").find("div").eq(1).css("display","block");
					count1();
				}
				
			})
			//房贷
			$(".calculateHouse").on("click",function(){
				var $loanMoney =parseInt($(".loanMoneyHouse").val());
				var $loanLimit =parseInt($(".loan-limitHouse").val());
				var $monthly = parseFloat($(".monthlyHouse").val())/100;
				var $backWay = $(".back-wayHouse").val();
				console.log($backWay);
				$(".calculator-formHouse").animate({marginLeft:"0px"},"slow");
				$(".calculate-resultHouse").animate({marginRight:"0px"},"slow","linear" );
                //等额本息
                function count() {
                    var mos = $loanLimit, //选择的还款期限(月)
                        capital = $loanMoney, //本金
                        monthPow = Math.pow((1+$monthly),mos),     // 一加利率的还款月数次方
                        payments = (( capital*$monthly*monthPow )/( monthPow -1) ); //每月还款额

                    var interests = (payments*mos-capital);  //还款总利息
                    var totalLoan = payments*mos; //还款总额
                    var interestsVal = interests.toFixed(2);
                    $(".loanCapitalInterestsHouse").val(payments.toFixed(2));
                    $(".backInterestsHouse").val(interests.toFixed(2));
                    $(".backCountHouse").val(totalLoan.toFixed(2));


                    if($(".loanMoneyHouse").val() == '') {
                        $(".loanCapitalInterestsHouse").val(0);
                        $(".backInterestsHouse").val(0);
                        $(".backCountHouse").val(0);
                    }
                    if($(".monthlyHouse").val() == '' || $(".monthlyHouse").val() == 0) {
                        $(".loanCapitalInterestsHouse").val(0);
                        $(".backInterestsHouse").val(0);
                        $(".backCountHouse").val(0);
                    }
                }
				//先息后本
				function count1(){
					var mos = $loanLimit, //选择的还款期限(月)
						capital = $loanMoney; //本金
					
					var interests = (capital*$monthly);  //每月利息
					var payments = capital + interests;  //每月还款本息
					var totalInterests = (capital*$monthly*mos);//还款总利息
					var totalLoan = capital*($monthly*mos+1); //还款总额
					$(".monthInterestsHouse").val(interests.toFixed(2));
					$(".backInterestsHouse").val(totalInterests.toFixed(2));
					$(".backCountHouse").val(totalLoan.toFixed(2));
					if($(".loanMoneyHouse").val() == '') {
						$(".calculate-resultHouse input").val(0);
					}
					if($(".monthlyHouse").val() == '' ) {
						$(".calculate-resultHouse input").val(0);
					}
				}
                //判断等额本息还是先息后本
                $(".calculate-resultHouse").find("div").eq(0).css("display","none");
                if($backWay ==　"先息后本"){
                    $(".monthInterestsHouse").css("display","block");
                    count1();
                }else if($backWay ==　"等额本息"){
                    $(".calculate-resultHouse").find("div").eq(1).css("display","none");
                    count();
                }
				
			})
			//信用贷款
			$(".calculateCredit").on("click",function(){
				var $loanMoney =parseInt($(".loanMoneyCredit").val());
				var $loanLimit =parseInt($(".loan-limitCredit").val());
				var $monthly = parseFloat($(".monthlyCredit").val())/100;
				var $backWay = $(".back-wayCredit").val();
				console.log($backWay);
				$(".calculator-formCredit").animate({marginLeft:"0px"},"slow");
				$(".calculate-resultCredit").animate({marginRight:"0px"},"slow","linear" );
			//等额本息
			function count() {
				var mos = $loanLimit, //选择的还款期限(月)
					capital = $loanMoney, //本金
					monthPow = Math.pow((1+$monthly),mos),     // 一加利率的还款月数次方
					payments = (( capital*$monthly*monthPow )/( monthPow -1) ); //每月还款额
					 
				var interests = (payments*mos-capital);  //还款总利息
				var totalLoan = payments*mos; //还款总额
				var interestsVal = interests.toFixed(2);
				$(".loanCapitalInterestsCredit").val(payments.toFixed(2));
				$(".backInterestsCredit").val(interests.toFixed(2));
				$(".backCountCredit").val(totalLoan.toFixed(2));
				
	
				if($(".loanMoneyCredit").val() == '') {
					$(".loanCapitalInterestsCredit").val(0);
					$(".backInterestsCredit").val(0);
					$(".backCountCredit").val(0);
				}
				if($(".monthlyCredit").val() == '' || $(".monthlyCredit").val() == 0) {
					$(".loanCapitalInterestsCredit").val(0);
					$(".backInterestsCredit").val(0);
					$(".backCountCredit").val(0);
				}
			}
				//判断等额本息还是先息后本
				if($backWay ==　"等额本息"){
					$(".calculate-resultCredit").find("div").eq(0).css("display","none");
					$(".calculate-resultCredit").find("div").eq(1).css("display","none");
					count();
				}
				
			})
			//重置按钮
			$(".reset").on("click",function(){
				$("input").val("0");
			})
		
	</script>
</html>
